package com.miracle9.game.dao;

import com.miracle9.game.entity.HallInfo;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class HallInfoDao extends SqlOperating<HallInfo, Integer> {

    public List<HallInfo> getList() {
        return q_CreateSqlList("from HallInfo order by hallId", new Object[0]);
    }

    public void update(List<HallInfo> list) {
        for (HallInfo hallInfo : list) {
            q_Update("update HallInfo set minGold=? where hallId=?", new Object[]{hallInfo.getMinGold(), hallInfo.getHallId()});
        }
    }

}